// test_module_quiz.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "module_quiz.h"
#include "dictionary.h"
#include "user_profile.h"

#include "dictionary_impl.h"
#include "user_profile_impl.h"
#include "message_input_queue_impl.h"
#include "message_output_queue_impl.h"
#include "logger_console.h"


int _tmain(int argc, _TCHAR* argv[])
{
	try
	{
		std::auto_ptr<Common::MessageOutputQueueImpl> OutputQueue(new Common::MessageOutputQueueImpl());
		std::auto_ptr<Common::MessageInputQueueImpl> InputQueue(new Common::MessageInputQueueImpl());

		std::auto_ptr<ModuleManagement::Dictionary> dict(new ModuleManagement::DictionaryImpl("questions.txt"));
		std::auto_ptr<ModuleManagement::UserProfile> profile(new ModuleManagement::UserProfileImpl("users.txt"));
		std::auto_ptr<Common::LoggerConsole> logger(new Common::LoggerConsole());

		ModuleManagement::QuizModuleParams params;
		params.dict = dict.get();
		params.profile = profile.get();
		params.in_queue = InputQueue.get();
		params.out_queue = OutputQueue.get();
		params.logger = logger.get();

		std::auto_ptr<ModuleManagement::QuizModule> module = ModuleManagement::CreateQuizModule(params);
	}
	catch(Common::Exception& e)
	{
	}
	
	return 0;
}

